package cn.pn.project.client.commodity;

import cn.pn.project.client.commodity.follback.ShowtypeFeignFallBack;
import cn.pn.project.pojo.commodity.Showtype;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name="pn-item-provider",fallback = ShowtypeFeignFallBack.class)
public interface ShowtypeFeign {

    @RequestMapping(value = "/listAllType",method = RequestMethod.GET)
    public List<Showtype> listAllType();


    @RequestMapping(value = "/listChildTypeByFatherId",method = RequestMethod.POST)
    List<Showtype> listChildTypeByFatherId(@RequestParam("fatherId") Integer fatherId);

    @RequestMapping(value = "/getTypeNameByTypeId", method = RequestMethod.POST)
    String getTypeNameByTypeId(@RequestParam("typeId")Integer typeId);
}
